<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var arr=[2,3,5,7,9,9,4,3,2,1]
    var set1=new Set(arr)
    var newarr=[...set1]
    console.log(newarr);


    // var arr=[4,6,8,9,2,6]
    // console.log(Math.max(...arr));


    // var arr=[4,7,5,3,8,789]
    // console.log(Math.max(...arr));
    


   
    
</script>